﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BoxScore.Model;
using BoxScore.Objetos;

namespace BoxScore.categoria
{
    public partial class Nuevo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Validate();
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Categoria categoria = new Categoria();
            categoria.descripcion = TextBox1.Text;
            BoxScoreBD bd = new BoxScoreBD();
            categoria = bd.NuevaCategoria(categoria);
            this.TextBox1.Text = "";

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            this.TextBox1.Text = "";
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            /*
            string idTorneo = this.DropDownList1.SelectedValue;
            foreach (GridViewRow fila in this.GridView1.Rows)
            {
                CheckBox check = (CheckBox)fila.FindControl("CheckBox1");
                if (check.Checked)
                {

                    string idCategoria = ((HiddenField)fila.FindControl("HiddenField1")).Value; 
                    
                }
            }
             */
        }
    }
}
